package com.example.springboot_sdse_air.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.springboot_sdse_air.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface UserMapper extends BaseMapper<User> {
    
    /**
     * 根据用户名查询用户
     */
    User selectByUsername(@Param("username") String username);
    
    /**
     * 检查用户名是否存在
     */
    int countByUsername(@Param("username") String username);
} 